package com.eastmoney.emis.edda.domain.event;

import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;

/**
 * @description: Description
 * @projectName: EDDA-HSBC
 * @package: com.eastmoney.emis.edda.domain
 * @author: 汪程程
 * @date: 2022/9/30 2:05 PM
 * @version: 1.0
 */
@Component
public class EventPublisher {
    private ApplicationEventPublisher publisher;

    public EventPublisher(ApplicationEventPublisher publisher) {
        this.publisher = publisher;
    }


    public void publish(EddaEvent event) {
        publisher.publishEvent(event);
    }
    public void publish(EddaFailEvent event) {
        publisher.publishEvent(event);
    }

    public void publish(EddiEvent event) {
        publisher.publishEvent(event);
    }
}
